﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Web;
using MN.Framework.Common;

namespace EmailSender.Models
{

    [Table("EmailAddress")]
    [DisplayColumn("EmailAddress", "ID")]
    public class EmailAddressModel : BaseEntity
    {
        public EmailAddressModel()
        {
            EmailCategory = new List<EmailCategoryModel>();
        }

        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Column("EmailId")]
        [Display(Name = "شناسه ایمیل")]
        public override int ID { get; set; }

        [Display(Name = "آدرس ایمیل")]
        public string EmailAddress { get; set; }

        [Display(Name = "عنوان ایمیل")]
        public string EmailTitle { get; set; }

        [Display(Name = "فعال/غیرفعال")]
        public bool Active { get; set; }

        public virtual ICollection<EmailCategoryModel> EmailCategory { get; set; }
    }
}